<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 两数之和对三个数进行累加
        function add(num1, num2) {
            let num = num1 + num2
            if (num2 + 1 > 100) {
                return num
            } else {
                return add(num, num2 + 1)
            }
        }
        console.log(add(1, 2));
    </script>
</body>

</html>